﻿using H2.NET.Common;
using H2.NET.Web.Pages.SMD.Model;
using H2.NET.Web.Pages.SMD.Service;
using H2.NET.Web.Workflow.DwzCode;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace H2.NET.Web.Management.MeiPing
{
    public partial class Create : BasePage
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            MeiPingService mpService = new MeiPingService();

            var action = AksRequest.GetQueryString("action");
            if (action == "save")
            {
                var mp = new t_smd_Meiping();
                mp.SerialNumber = AksRequest.GetFormString("SerialNumber");
                mp.Status = bool.Parse(AksRequest.GetFormString("Status"));
                mpService.Add(mp);
                SuccessMsg("MeiPingIndex");
            }
        }
    }
}